package windows;

import handler.ButtonsListener;

import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import connection.ClientConnection;

public class MainFrame extends JFrame{
	ClientConnection connection=new ClientConnection();
	
	public ClientConnection getConnection() {
		return connection;
	}
	public void setConnection(ClientConnection connection) {
		this.connection = connection;
	}
	public JTextField getWrite() {
		return write;
	}
	public void setWrite(JTextField write) {
		this.write = write;
	}
	public JTextArea getArea() {
		return area;
	}
	public void setArea(JTextArea area) {
		this.area = area;
	}
public	JTextField write = new JTextField();
	JButton b=new JButton("Send");
	JTextArea area=new JTextArea();
	JPanel p=new JPanel();
public MainFrame()
{
	p.add(area);
	area.setPreferredSize(new Dimension(400, 300));
	write.setPreferredSize(new Dimension(400, 100));
	p.add(write);
	p.add(b);
	ButtonsListener action =new ButtonsListener(this);
	b.addActionListener(action);
	getContentPane().add(p);
setSize(500,500);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}
}
